package com.sdy.dataexchange.meta.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sdy.dataexchange.core.schedule.DynamicScheduler;
import com.sdy.dataexchange.meta.mapper.MetadataJobMapper;
import com.sdy.dataexchange.meta.model.MetadataJob;
import com.sdy.dataexchange.meta.service.MetadataJobService;
import com.sdy.mvc.service.impl.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author wyy
 * @since 2019-11-07
 */
@Slf4j
@Service
public class MetadataJobServiceImpl extends BaseServiceImpl<MetadataJob> implements MetadataJobService {
    @Autowired
    private MetadataJobMapper metadataJobMapper;
    @Autowired
    private DynamicScheduler dynamicScheduler;

    @Override
    public List<MetadataJob> queryAllModJob(String date) {
        return metadataJobMapper.queryByDate(date);
    }

    @Override
    public List<MetadataJob> queryAllModJob(Page<MetadataJob> page) throws SchedulerException {

//        dynamicScheduler.updateCronTrigger("111",MyClass.class,"");
        return null;
    }

    @Override
    public Integer addByOneModJob(MetadataJob metadataJob) {
        return null;
    }

    @Override
    public Integer delByOneModJob(Integer modJobId) {
        return null;
    }

    @Override
    public Integer updByOneModJob(Integer modJobId) {
        return null;
    }
}
